package com.ruoyi.community.service.impl;

import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.community.domain.CmtWork;
import com.ruoyi.community.mapper.CmtWorkMapper;
import com.ruoyi.community.service.ICmtWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CmtWorkServiceImpl implements ICmtWorkService {
    /**
     * 如果调用其他模块，注入service;
     */
    @Autowired
    private CmtWorkMapper vigWorkMapper;


    @Override
    public List<CmtWork> selectWorkList(CmtWork work) {
        return vigWorkMapper.selectWorkList(work);
    }

    @Override
    public int insertWork(CmtWork work) {
        return vigWorkMapper.insertWork(work);
    }




    /**
     * 修改保存身份证信息
     *
     * @param work 身份证信息
     * @return 结果
     */
    @Override
    public int updateWork(CmtWork work) {
        return vigWorkMapper.updateWork(work);
    }




    /**
     * 通过身份证ID查询身份证信息
     *
     * @param workId 身份证ID
     * @return 角色对象信息
     */
    @Override
    public CmtWork selectWorkById(Long workId) {
        return vigWorkMapper.selectWorkById(workId);
    }


    /**
     * 删除身份证信息
     *
     * @param workId 身份证ID
     * @return 结果
     */
    @Override
    public int deleteWorkById(Long workId) {
        return vigWorkMapper.deleteWorkById(workId);
    }


    /**
     * 批量删除身份证信息
     *
     * @param workIds 需要删除的身份证ID
     * @return 结果
     * @throws Exception 异常
     */
    @Override
    public int deleteWorkByIds(Long[] workIds) {

        return vigWorkMapper.deleteWorkByIds(workIds);
    }

    @Override
    public List<CmtWork> selectWorkAll() {
        return vigWorkMapper.selectWorkAll();
    }


}
